﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using CTRLayer;
using ModelLayer;


namespace WcfTicketsLibrary
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "Service1" in both code and config file together.
    // MUST implement ICities, and all of its methods
    public class CityService : ICities
    {
        private CTRCity ctrCity;

        //constructor
        public CityService()
        {
            ctrCity = new CTRCity();
        }

        public void AddCityToDB(int postalCode, string cityName)
        {
            ctrCity.AddCityToDB(postalCode, cityName);
        }

        public City RetrieveCity(int postalCode)
        {
            return ctrCity.RetrieveCity(postalCode);
            
        }

        public List<City> RetrieveAllTheCities()
        {
            return ctrCity.RetrieveAllTheCities();
            
        }

        public void DeleteCities()
        {
            ctrCity.DeleteCities();
        }

    }
}
